import request from '@/utils/request'

// 轮播图-----------

// 获取轮播图
export const getAdvCourse = () => {
    return request({
        method: 'GET',
        url: 'course/getAdvCourse',
    })
}
// 添加轮播图
export const addAdvCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/addAdvCourse',
        data
    })
}
// 编辑轮播图
export const editAdvCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/editAdvCourse',
        data
    })
}
// 删除轮播图
export const delAdvCourse = (params) => {
    return request({
        method: 'DELETE',
        url: '/course/delAdvCourse',
        params
    })
}




// 进站必学-----------

export const getRecGoodCourseByType = () => {
    return request({
        method: 'GET',
        url: '/course/getRecGoodCourseByType',
    })
}


export const getAllGootCourse = () => {
    return request({
        method: 'GET',
        url: 'course/getAllGootCourse',
    })
}

export const addGoodCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/addGoodCourse',
        data
    })
}

export const editGoodCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/editGoodCourse',
        data
    })
}

export const delGoodCourse = (params) => {
    return request({
        method: 'DELETE',
        url: '/course/delGoodCourse',
        params
    })
}


// 新上好课-----------

export const getNewCourseByType = () => {
    return request({
        method: 'GET',
        url: '/course/getNewCourseByType',
    })
}


export const getAllNewCourse = () => {
    return request({
        method: 'GET',
        url: 'course/getAllNewCourse',
    })
}

export const addNewCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/addNewCourse',
        data
    })
}

export const editNewCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/editNewCourse',
        data
    })
}

export const delNewCourse = (params) => {
    return request({
        method: 'DELETE',
        url: '/course/delNewCourse',
        params
    })
}



// 学习路线-----------

export const getLearnRouteCourseByType = () => {
    return request({
        method: 'GET',
        url: '/course/getLearnRouteCourseByType',
    })
}


export const getAllLearnRouteCourse = () => {
    return request({
        method: 'GET',
        url: 'course/getAllLearnRouteCourse',
    })
}

export const addLearnRouteCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/addLearnRouteCourse',
        data
    })
}

export const editLearnRouteCourse = (data) => {
    return request({
        method: 'POST',
        url: '/course/editLearnRouteCourse',
        data
    })
}

export const delLearnRouteCourse = (params) => {
    return request({
        method: 'DELETE',
        url: '/course/delLearnRouteCourse',
        params
    })
}